//C11:11.11:put2.c -- output a string, count characters.
#include <stdio.h>

int put2(const char *string)
{
	int count = 0;
	while (*string)
	{
		putchar(*string++);
		count++;
	}
	putchar('\n');
	return count;
}

int main(void)
{
	int cnt = 0;
	char *str1 = "Helloworld!";
	cnt = put2(str1);
	printf("cnt = %d\n", cnt);
}
